package com.oneday.nuo.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * (NuoMenu)表实体类
 *
 * @author liushuai
 * @since 2021-03-13 23:37:18
 */
@ApiModel(value = "")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@TableName("nuo_menu")
public class NuoMenuEntity extends Model<NuoMenuEntity> {
    private static final long serialVersionUID = 802395861345894958L;

    /**
     * 主键主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    @NotNull(message = "{id.require}")
    @ApiModelProperty(value = "主键主键")
    private String id;
    /**
     * 菜单名称
     */
    @NotNull(message = "菜单名称不能为空")
    @ApiModelProperty(value = "菜单名称")
    private String name;
    /**
     * 路径
     */
    @NotNull(message = "路径不能为空")
    @ApiModelProperty(value = "路径")
    private String path;
    /**
     * 组件url
     */
    @NotNull(message = "组件url不能为空")
    @ApiModelProperty(value = "组件url")
    private String component;


    @NotNull(message = "组件名称不能为空")
    @ApiModelProperty(value = "组件名称")
    private String componentName;
    /**
     * 父id
     */
    @NotNull(message = "父id不能为空")
    @ApiModelProperty(value = "父id")
    private String pid;

    /**
     * 路由别名
     */
    @ApiModelProperty(value = "路由别名")
    private String alias;
    /**
     * 创建人
     */
    @NotNull(message = "创建人不能为空")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String createUser;
    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改人")
    private String updateUser;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date updateDate;
    @ApiModelProperty(value = "排序字段")
    private Integer sortIndex;
}